<?php
namespace Client\Table;

use Zend\Db\Sql\Select;
use Zend\Paginator\Adapter\DbSelect;

use Zend\Paginator\Paginator;
use Zend\Db\Sql\Where;
use Zend\Db\ResultSet\ResultSet;

class CategoryTable extends CommonTable
{
    protected $table = 'hy_category';
    protected $id = 'category_id';
    
    public function fetchAll() {
    	$select = new Select(array('c' => $this->getTable()));
    	$rowset = $this->selectWith($select);
    	$rowList = $rowset->toArray();
    	return $rowList;

    }
    

   /**
    * 根据单位取类目信息
    * @param unknown $org_id
    */
    public function getCateListByOrgId($org_id)
    {
        $select = new Select(array('c' => $this->getTable()));
        $select->where(array('c.org_id' => $org_id));
        $rowset = $this->selectWith($select);
        $rowList = $rowset->toArray();
        return $rowList;
    }
    





 
}